home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C/C++ Interactive Reference Guide
/
C-C++ Interactive Reference Guide.iso
/
c_ref
/
csource5
/
352_01
/
strppasn.cpp
< prev
next >
Wrap
C/C++ Source or Header
|
1991-05-01
|
493b
|
20 lines
// STRPPASN.CPP
// String::assign () transfers ownership of data to the String
// ( allows constructing Strings from allocated buffers
// ... without having to 'strdup' or make extra copies. )
//
#include "dblib.h"
void String::assign ( char *data )
{
typedef char *ASSIGN_DATA_PTR;
destruct ();
if ( data != NULL )
{
_NORMALIZE( data, ASSIGN_DATA_PTR );
s=data;
n=strlen (data);
}
}
//----------------- end of STRPPASS.CPP -----------------------